﻿package 
{
    import MCMiniMap.*;
    import com.assist.view.interfaces.*;
    import flash.display.*;
    import flash.events.*;
    import flash.text.*;

    public class MCMiniMap extends Sprite implements IMiniMap
    {
        public var _MapName:TextField;
        public var _Setting:SimpleButton;
        public var _World:SimpleButton;
        public var _GameHelp:SimpleButton;
        public var _SoundMute:SimpleButton;
        public var _Hide:SimpleButton;
        public var _Show:SimpleButton;
        public var _SoundOpen:SimpleButton;
        private var _onSubline:Function;
        private var _onWorld:Function;
        private var _onSetting:Function;
        private var _onShow:Function;
        private var _onHide:Function;
        private var _onGameHelp:Function;
        private var _tip:ITip;

        public function MCMiniMap()
        {
            var _loc_1:* = new Function();
            this._onHide = new Function();
            var _loc_1:* = _loc_1;
            this._onShow = _loc_1;
            var _loc_1:* = _loc_1;
            this._onSetting = _loc_1;
            var _loc_1:* = _loc_1;
            this._onWorld = _loc_1;
            this._onSubline = _loc_1;
            this._World.addEventListener(MouseEvent.CLICK, this.onWorldClick);
            this._Setting.addEventListener(MouseEvent.CLICK, this.onSettingClick);
            this._Show.addEventListener(MouseEvent.CLICK, this.onShowClick);
            this._Hide.addEventListener(MouseEvent.CLICK, this.onHideClick);
            this._GameHelp.addEventListener(MouseEvent.CLICK, this.onGameHelpClick);
            return;
        }// end function

        private function setTips(param1:DisplayObject, param2:String) : void
        {
            if (this._tip)
            {
                this._tip.addTarget(param1, param2);
            }
            return;
        }// end function

        private function onShowClick(event:Event) : void
        {
            this._onShow();
            this._Show.visible = false;
            this._Hide.visible = true;
            return;
        }// end function

        private function onHideClick(event:Event) : void
        {
            this._onHide();
            this._Hide.visible = false;
            this._Show.visible = true;
            return;
        }// end function

        private function onWorldClick(event:Event) : void
        {
            this._onWorld();
            return;
        }// end function

        private function onSettingClick(event:Event) : void
        {
            this._onSetting();
            return;
        }// end function

        private function onGameHelpClick(event:Event) : void
        {
            this._onGameHelp();
            return;
        }// end function

        public function get content() : Sprite
        {
            return this;
        }// end function

        public function set mapName(param1:String) : void
        {
            this._MapName.htmlText = "<b>" + param1 + "</b>";
            return;
        }// end function

        public function get mapName() : String
        {
            return this._MapName.text;
        }// end function

        public function set worldVisible(param1:Boolean) : void
        {
            this._World.visible = param1;
            return;
        }// end function

        public function set settingVisible(param1:Boolean) : void
        {
            this._Setting.visible = param1;
            return;
        }// end function

        public function set gameHelpVisible(param1:Boolean) : void
        {
            this._GameHelp.visible = param1;
            return;
        }// end function

        public function set showVisible(param1:Boolean) : void
        {
            this._Show.visible = param1;
            return;
        }// end function

        public function set hideVisible(param1:Boolean) : void
        {
            this._Hide.visible = param1;
            return;
        }// end function

        public function set onWorld(param1:Function) : void
        {
            this._onWorld = param1;
            return;
        }// end function

        public function set onSetting(param1:Function) : void
        {
            this._onSetting = param1;
            return;
        }// end function

        public function set onShow(param1:Function) : void
        {
            this._onShow = param1;
            return;
        }// end function

        public function set onHide(param1:Function) : void
        {
            this._onHide = param1;
            return;
        }// end function

        public function set onGameHelp(param1:Function) : void
        {
            this._onGameHelp = param1;
            return;
        }// end function

        public function set tip(param1:ITip) : void
        {
            this._tip = param1;
            return;
        }// end function

    }
}
